package net.yla.smartbus.module.controller.web.ba.qqwry;

import net.yla.smartbus.core.api.ApiResult;
import net.yla.smartbus.core.async.NativeAsyncTaskExecutePool;
import net.yla.smartbus.core.base.BaseController;
import net.yla.smartbus.core.util.qqwry.ext.IPZone;
import net.yla.smartbus.core.util.qqwry.ext.QQWry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Executor;

/**
 * @Date: 2020-08-12 14:54
 * @Author: Being Nobody
 * @Version: 1.0
 */
@RestController
@RequestMapping("/ip")
public class QQWryController extends BaseController {
    @Autowired
    QQWry qqWry;

    @GetMapping
    ApiResult ipSearch(String ip) {
        IPZone ip1 = qqWry.findIP(ip);
        return success(ip1);
    }

}
